package com.chalk.common.constant;

/**
 * @author xiaoqiang
 * @Description 通用  constants
 * @date 2019/3/22 17:22
 */
public class CommonConstants {

    /**
     * 编码
     */
    public static final String UTF8 = "UTF-8";

    public static final String SHOP_LEVEL_DEFAULT="1";

    /**
     * 下滑杠
     */
    public static final String SLIDE_BA = "_";

    /**
     * content_type(JSON 资源)
     */
    public static final String CONTENT_TYPE = "application/json; charset=utf-8";

    /**
     * 用户默认密码
     */
    public static final String DEFAULT_PASSWORD = "123456";

    /**
     * 节点 level
     */
    public static final Integer NODE_LEVEL = 1;
    /**
     * root 节点 id
     */
    public static final String ROOT_ID = "1";

    /**
     * Admin role id
     */
    public static final String ROOT_ROLE_ID = "1";
    /**
     * Admin platform id(平台在卖家表的id)
     */
    public static final String ROOT_PLATFORM_ID = "0";
    /**
     * Admin id(平台用户表的id)
     */
    public static final String ROOT_ADMIN_ID = "1";
    /**
     * 天开企业id
     */
        public static final String TIAN_KAI_ENTERPRISE_ID="1";
    /**
     * 密码最大长度
     */
    public static final int APP_USER_PWD_MAX_LEN = 17;
    /**
     * 密码最小长度
     */
    public static final int APP_USER_PWD_MIN_LEN = 5;

    /**
     * 足迹redis头信息
     */
    public static final String FOOT_PRINGT = "FOOT_PRINGT:";
    /**
     * 足迹redis存储时间(天) day
     */
    public static final long FOOT_PRINGT_TIME = 7L;

    /**
     * 足迹存储空间最大值
     */
    public static final long FOOT_PRINGT_MAX_SIZE = 59L;

    /**
     * 活动表id
     */
    public static final String ACTIVITY_ITEM_ID = "ACTIVITY_ITEM_ID:";

    /**
     * 秒杀商品 id
     */
    public static final String SECOND_KILL_ITEM_ID = "KILL_ITEM_ID";
    /**
     * MQ秒杀队列待处理秒杀消息
     */
    public static final String QUEUE_PRE_KILL = "QUEUE_PRE_KILL:";
    /**
     * 秒杀商品redis key 前缀
     */
    public static final String SECOND_KILL_GOODS = "KILL_GOODS:";
    /**
     * 秒杀商品库存 redis key 前缀
     */
    public static final String SECOND_KILL_INVENTORY = "KILL_INVENTORY:";
    /**
     * 已买用户
     */
    public static final String BOUGHT_USERS = "BOUGHT_USERS:";


    /**
     * 活动中心活动状态:已发布/未开始
     */
    public static final String ACTIVITY_CENTER_NOT_STARTED = "AC_NO_START:";

    /**
     * 活动中心活动状态:进行中
     */
    public static final String ACTIVITY_CENTER_PROCESSING = "AC_ING:";

    /**
     * 商家发帖默认置顶天数
     */
    public static final int BUSINESS_NEWS_TOP_DAYS = 2;

    /**
     * 截取视频的帧数
     */
    public static final int VIDEO_FRANE = 1;

    /**
     * 小程序商家店铺页面
     */
    public static final String SELLER_CODE_PAGE = "pages/servicePage/servicePage";

    /**
     * 签到积分值
     */
    public static final int three = 3;
    public static final int five = 5;
    public static final int seven = 7;

    /**
     * 删除标识(1 未删除  2 已删除)
     */
    public enum IsDeleted {
        /**
         * 未删除
         */
        NOTDEL(0, "未删除"),
        /**
         * 已删除
         */
        DEL(1, "已删除");
        /**
         * value
         */
        private Integer value;
        /**
         * name
         */
        private String name;

        private IsDeleted(Integer value, String name) {
            this.value = value;
            this.name = name;
        }

        public Integer getValue() {
            return value;
        }

        public String getName() {
            return name;
        }

    }

    /**
     * 通用(0 否 1 是)
     */
    public enum CommonStatus {
        /**
         * 否
         */
        NO(0, "否"),
        /**
         * 已删除
         */
        YES(1, "是");
        /**
         * value
         */
        private Integer value;
        /**
         * name
         */
        private String name;

        private CommonStatus(Integer value, String name) {
            this.value = value;
            this.name = name;
        }

        public Integer getValue() {
            return value;
        }

        public String getName() {
            return name;
        }

    }

    /**
     * 分润类型
     */
    public enum IntegralType {
        /**
         * 百分比
         */
        PERCENTAGE(0, "百分比"),
        /**
         * 实际值
         */
        ACTUALVALUE(1, "实际值");
        /**
         * value
         */
        private Integer value;
        /**
         * name
         */
        private String name;

        private IntegralType(Integer value, String name) {
            this.value = value;
            this.name = name;
        }

        public Integer getValue() {
            return value;
        }

        public String getName() {
            return name;
        }
    }


    /**
     * 积分分润等级
     */
    public enum DividedLV {
        /**
         * 一级
         */
        FRIST_LV(1, "一级"),
        /**
         * 二级
         */
        SECOND_LV(2, "二级");
        /**
         * value
         */
        private Integer value;
        /**
         * name
         */
        private String name;

        private DividedLV(Integer value, String name) {
            this.value = value;
            this.name = name;
        }

        public Integer getValue() {
            return value;
        }

        public String getName() {
            return name;
        }
    }

    /**
     * 运营状态
     */
    public enum RunningStatus {
        REGISTRATION_RUNNING(0, "新注册未运营"),

        OPERATING(1, "运营中"),

        PLATFORM_BUSINESS(2, "平台暂停商家运营"),

        BUSINESSES_SUSPEND(3, "商家自行暂停运营");
        /**
         * value
         */
        private Integer value;
        /**
         * name
         */
        private String name;

        private RunningStatus(Integer value, String name) {
            this.value = value;
            this.name = name;
        }

        public Integer getValue() {
            return value;
        }

        public String getName() {
            return name;
        }

    }

    /**
     * 审核状态
     */
    public enum CensorStatus {
        /**
         * 待审核
         */
        PENDING_REVIEW(0, "待审核"),
        /**
         * 资质审核通过
         */
        AUDITED(1, "资质审核通过"),
        /**
         * 拒绝
         */
        REFUSE(2, "拒绝"),
        /**
         * 资料待审核
         */
        DATA_PENDING_REVIEW(3, "资料待审核"),
        /**
         * 资料审核通过
         */
        DATA_AUDITED(4, "资料审核通过"),
        /**
         * 资料审核拒绝
         */
        DATA_REFUSE(5, "资料审核拒绝");
        /**
         * value
         */
        private Integer value;
        /**
         * name
         */
        private String name;

        private CensorStatus(Integer value, String name) {
            this.value = value;
            this.name = name;
        }

        public Integer getValue() {
            return value;
        }

        public String getName() {
            return name;
        }
    }
}
